package players;

import game.Pitch;
import cards.Deck;

abstract class PitchPlayer implements IPlayer{

	protected int score;
	protected int bid;
	protected boolean dealer;
	protected boolean lead;
	public Deck hand;
	public Deck won;
	public String name;
	
	public PitchPlayer(String name){
		
		score = 0;
		bid = Pitch.NO_BID;
		dealer = false;
		lead = false;
		hand = new Deck(Pitch.HAND_SIZE);
		won = new Deck(Pitch.WON_SIZE);
		this.name = name;
	
	}
	
	//bid methods
	
	public int getBid(){
		return bid;
	}
	
	public void setBid(int x){

		bid = x;
	
	}
	
	//leader methods
	
	public boolean isLeader(){
		return lead;
	}
	
	public void setLeader(boolean x){
		lead = x;		
	}
	
	//dealer methods
	
	public boolean isDealer(){
		return dealer;
	}
	
	public void flipDealer(){
		dealer = dealer ? false : true;		
	}
	
	//scoring methods
	
	public int getScore(){
		return score;
	}
	
	public void addScore(int x){
		score += x;
	}
	
}